/**
 * 开放接口
 * Created by hice on 2017/3/30.
 */
const state = {}

const getters = {}

const actions = {}

const mutations = {
  //首页数据
  INDEX: (state, { body, that }) => {
    that.banners = body.result.bannerList
    that.borrows = body.result.borrowList
  },
  BORROW_LIST: (state, { body, that }) => {
    that.borrowList = body.result.page
    that.page.totalPage = body.result.totalPage
    that.page.currentPage = body.result.currentPage
    that.page.pageSize = body.result.pageSize
  },
  BORROW: (state, { body, that }) => {
    that.borrow = body.result
    state.borrow = body.result
  },
  BORROW_DESCRIPTION: (state, { body, that }) => {
    that.borrow = body.result
  }

}

export default {
  state,
  mutations,
  getters,
  actions
}
